package org.restorator.dao.jdbc;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author Snisar Bogdan
 */
public interface RowMapper <E> {
    /**
     * Create and mapped entity {@code E} by one result set row
     *
     * @param rs {@link ResultSet} resultSet of sql query.
     * @param rowCount number of row.
     * @return new instance of entity {@code E}, mapped by result set data
     */
    E mapRow(ResultSet rs, int rowCount) throws SQLException;
}
